import { RestService } from '@abp/ng.core';
import { Injectable } from '@angular/core';
import type { AnalysisDto } from '../core/models';

@Injectable({
  providedIn: 'root',
})
export class CustomerTypeSyncService {
  apiName = 'BasicArchives';
  

  analyze = () =>
    this.restService.request<any, AnalysisDto>({
      method: 'POST',
      url: '/api/basic-archives/customer-type-sync/analyze',
    },
    { apiName: this.apiName });
  

  createByIds = (ids: number[]) =>
    this.restService.request<any, number>({
      method: 'POST',
      url: '/api/basic-archives/customer-type-sync/create-by-ids',
      body: ids,
    },
    { apiName: this.apiName });
  

  getSyncedIds = () =>
    this.restService.request<any, number[]>({
      method: 'GET',
      url: '/api/basic-archives/customer-type-sync/synced-ids',
    },
    { apiName: this.apiName });
  

  getUnasyncIds = () =>
    this.restService.request<any, number[]>({
      method: 'GET',
      url: '/api/basic-archives/customer-type-sync/unasync-ids',
    },
    { apiName: this.apiName });
  

  updateByIds = (ids: number[]) =>
    this.restService.request<any, number>({
      method: 'POST',
      url: '/api/basic-archives/customer-type-sync/update-by-ids',
      body: ids,
    },
    { apiName: this.apiName });

  constructor(private restService: RestService) {}
}
